home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / boot / czesc_2 / smsrc / sm / library.pas < prev    next >
Pascal/Delphi Source File  |  1995-07-11  |  1KB  |  40 lines

  1. Function Open_Libs;
  2.  
  3. begin
  4.     IntuitionBase := pIntuitionBase(OpenLibrary('intuition.library',37));
  5.     GadToolsBase  := Openlibrary('gadtools.library',37);
  6.     GfxBase  := pGfxBase(Openlibrary('graphics.library',37));
  7.     DiskFontBase  := Openlibrary('diskfont.library',0);
  8.     UtilityBase  := pUtilityBase(Openlibrary('utility.library',37));
  9.     RexxSysBase := pRxsLib(Openlibrary('rexxsyslib.library',0));
  10.     DataTypesBase := OpenLibrary('datatypes.library', 39);
  11.     
  12.     if (IntuitionBase <> NIL) and (GadToolsBase <> NIL) and (GfxBase <> NIL)
  13.     and (DiskFontBase <> NIL) and (UtilityBase <> NIL) Then
  14.         Open_Libs := True
  15.     else
  16.         Open_Libs := False;
  17. end;
  18.  
  19. Procedure Close_Libs;
  20.  
  21. begin
  22.     if RexxSysBase <> NIL then
  23.         CloseLibrary(pLibrary(RexxSysBase));
  24.     CloseLibrary(pLibrary(UtilityBase));
  25.     CloseLibrary(pLibrary(DiskFontBase));
  26.     CloseLibrary(pLibrary(GfxBase));
  27.     CloseLibrary(pLibrary(GadToolsBase));
  28.     CloseLibrary(pLibrary(IntuitionBase));
  29.     if DataTypesBase <> NIL then
  30.         CloseLibrary(DataTypesBase);
  31. end;
  32.  
  33. Function UpperStr;
  34. Var
  35.      X : Byte;
  36. Begin
  37.   For X := 1 To Length(S) Do
  38.     S[X] := UpCase(S[X]);
  39.   UpperStr := S;
  40. End;